import { createApp } from 'vue'
import App from './App.vue'
import ElementPlus from 'element-plus'
import zhCn from 'element-plus/es/locale/lang/zh-cn'
import 'virtual:svg-icons-register'
import SvgIcon from './components/common/SvgIcon.vue'
import '@/assets/styles/index.scss'
import "element-plus/theme-chalk/dark/css-vars.css"
import router from './router'
import pinia from './stores'
import '@/permission'
// 引入自定义插件对象：注册整个项目的全局组件
import  GlobalComponents  from '@/components/Index'
import isHasBtn  from '@/directive/BtnPermission'
const app=createApp(App)
// console.log(import.meta.env);

app.use(ElementPlus, {
  locale: zhCn,
})
app.use(router)  //注册路由
app.use(pinia)  // 注册pinia
// 注册全局组件
app.component('SvgIcon',SvgIcon)
app.use(isHasBtn)  //自定义指令
app.use(GlobalComponents)
app.mount('#app')
